package com.zy.project.system.login.manager;

import com.zy.core.common.exception.user.UserNotExistsException;
import com.zy.core.util.asy.AsyncFactory;
import com.zy.project.system.user.entity.SystemUser;
import com.zy.project.system.user.manager.SystemUserManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import org.springframework.web.context.request.async.WebAsyncManager;
import sun.misc.MessageUtils;

/**
 * Package: com.zy.project.system.login.manager
 * <p>
 * Description： TODO
 * <p>
 * Author: zhangyu
 * <p>
 * Date: Created in 2018-11-3 13:57
 * <p>
 * Company: mingtu
 * <p>
 * Copyright: Copyright (c) 2018
 * <p>
 * Version: 0.0.1
 * <p>
 * Modified By:
 */
@Service
public class LoginManager {

    @Autowired
    private SystemUserManager userManager;

    /**
     * 用于登录的一些验证
     * @param user
     * @param password
     * @return
     */
    /*public SystemUser login(SystemUser user, String password){
        // 用户名或密码为空 错误
        if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)){
            WebAsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("not.null")));
            throw new UserNotExistsException();
        }
        return null;
    }*/
}
